package com.jrx.anytxn.param.mapper.ext;

import com.jrx.anytxn.common.annotation.ParamTuningAnnotation;
import com.jrx.anytxn.param.entity.PrBlockCode;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author liuyu
 * @Description
 */
public interface ExtPrBlockCodeMapper {

    PrBlockCode selectByTenantIdAndBlockCode(@Param("tenantId") String tenantId, @Param("blockCode") String blockCde);

    List<PrBlockCode> selectByTenantId(@Param("tenantId") String tenantId);

    @ParamTuningAnnotation
    int updateByTenantIdAndBlockCode(PrBlockCode prBlockCode);

    PrBlockCode selectByTenIdAndBlockCodeAndStatus(@Param("tenantId") String tenant_id,
                                                   @Param("blockCode") String blockCode,
                                                   @Param("codeStatus") String codeStatus);


    String findByDelqDaysAndTenId(@Param("tenantId") String tenant_id,
                                  @Param("delqDays") Integer delqDays);

    int deleteByTenIdAndBlockCode(String tenantId, String organizationId, String blockCode);

    List<PrBlockCode> findAllBlockCodeByTenId(@Param("tenantId") String tenantId);

}
